package proxy.staticProxy;

/**
 * @author mubei
 * @date 2021/12/14
 * @description
 */
public class ProxyTeacherDao implements ITeacherDao {
    // 目标对象  通过接口聚合
    ITeacherDao teacherDao;

    public ProxyTeacherDao(ITeacherDao teacherDao) {
        this.teacherDao = teacherDao;
    }

    @Override
    public void teach() {
        System.out.println("帮忙代理");
        teacherDao.teach();
    }
}
